home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / wildcat / avu1r6.zip / VIEWCOMP.WCX (.txt) < prev   
Wildcat! WCX  |  1996-05-27  |  9KB  |  460 lines

  1. '! Decompiled with wccNosy version 4.20f (freeware)
  2. '! Input File: in.wcx  9194 bytes  03/09/122  08:19:24am
  3. '! Code Segment Size  :7169 bytes
  4. '! Data Segment Size  :8133 bytes
  5. '! String Segment Size:2025 bytes
  6. '! Compiled with WCC version ? 019C017B
  7.  
  8.       Declare Sub Sub7068(s65534 As String)
  9.       Declare Sub Sub7097
  10.  
  11.       Dim s4463 As String
  12.       Dim s4467 As String
  13.       Dim s4471 As String
  14.       Dim s4475 As String
  15.       Dim s4479 As String
  16.       Dim s4483 As String
  17.       Dim w4487 As Word
  18.       Dim i4489 As Integer
  19.       Dim i4491 As Integer
  20.       Dim i4493 As Integer
  21.       Dim i4495 As Integer
  22.       Dim i4497 As Integer
  23.       Dim i4499 As Integer
  24.       Dim i4501 As Integer
  25.       Dim l4503 As Long
  26.       Dim s4507 As String
  27.       Dim s4511 As String
  28.       Dim s4515 As String
  29.       Dim s4519 As String
  30.       Dim s4523 As String
  31.       Dim s4527 As String
  32.       Dim s4531 As String
  33.       Dim s4535 As String
  34.       Dim s4539 As String
  35.       Dim s4543 As String
  36.       Dim s4547 As String
  37.       Dim s4551 As String
  38.       Dim s4555 As String
  39.       Dim s4559 As String
  40.       Dim s4567 As String
  41.       Dim s4575 As String
  42.       Dim s4579 As String
  43.       Dim s4589 As String*3
  44.       Dim s4592 As String*3
  45.       Dim s4595 As String*1
  46.       Dim s4596 As String*3
  47.       Dim s4599 As String*1
  48.       Dim s4600 As String*35
  49.       Dim s4635(0 To 500) As String
  50.       Dim o6639 As Boolean
  51.       Dim o6640 As Boolean
  52.       Dim o6641 As Boolean
  53.       Dim o6642 As Boolean
  54.       Dim o6643 As Boolean
  55.       Dim o6644 As Boolean
  56.       Dim fr6645 As FileRecord
  57.       Dim s8129 As String
  58.  
  59.       Dim l65524_ As Long
  60.       Dim i65528_ As Integer
  61.       Dim i65530_ As Integer
  62.       Dim s65532_ As String
  63.  
  64.       s4463 = "@0D@"
  65.       s4467 = "@0E@"
  66.       s4471 = "@0F@"
  67.       s4475 = "@0B@"
  68.       s4479 = "@0A@"
  69.       s4483 = "@07@"
  70.       s4511 = ParamStr(1)
  71.       s4599 = Chr(26)
  72.       s4600 = Chr(7) + Chr(13) + Chr(13) + Chr(10) + s4463 + ">File Display limit reached!"
  73.       s4543 = ".\viewcomp.cfg"
  74.       o6639 = 0
  75.       s4589 = Trim(Str(Node))
  76.       s4507 = "1.6"
  77.       If Exists(s4543) Then
  78.         Open s4543 For Input As 1
  79.         Input #1, l4503
  80.         Input #1, i4499
  81.         Input #1, o6643
  82.         Input #1, s4539
  83.         s4539 = UCase(s4539)
  84.         Close 1
  85.       End If
  86.   277 If l4503 > 0 Then
  87.         o6639 = -1
  88.       Else
  89.   305   o6639 = 0
  90.       End If
  91.   311 If i4499 < 1 Then
  92.         o6641 = 0
  93.       Else
  94.   338   o6641 = -1
  95.       End If
  96.   346 If InStr(s4539, UCase(User.SecLevel)) Then
  97.         o6642 = -1
  98.       Else
  99.   386   If s4539 = "*" Then
  100.           o6642 = -1
  101.         Else
  102.   417     If s4539 = "" Then
  103.             o6642 = 0
  104.           End If
  105.         End If
  106.       End If
  107.   440 GoSub 4634
  108.       If Right(s4511, 3) = "ZIP" Then
  109.         Print "Opening "; s4479; s4515; s4475; ".. please wait a moment"
  110.       Else
  111.   508   If Right(s4511, 3) = "EXE" Then
  112.           Print "Testing "; s4479; s4515; s4475; " for ZIP.. please wait a moment"
  113.         Else
  114.   570     If Right(s4511, 3) = "TXT" Then
  115.             w4487 = DisplayTextFile(s4511)
  116.             End 
  117.           Else
  118.   611       Beep 
  119.             Print "Sorry - This version can only handle .ZIP, some .EXE and .TXT"; " files at the moment"
  120.             End 
  121.           End If
  122.         End If
  123.       End If
  124.   631 If Environ("AVU") = "" Then
  125.         s4519 = Environ("TEMP")
  126.       Else
  127.   670   s4519 = Environ("AVU")
  128.       End If
  129.   682 If Right(s4519, 1) <> "\" Then
  130.         s4519 = s4519 + "\"
  131.       End If
  132.   719 s4523 = s4519 + "view" + s4589 + ".tmp"
  133.       s4527 = s4519 + "view" + s4589 + ".tm2"
  134.       s4531 = s4519 + "view" + s4589 + ".tm3"
  135.       If Right(s4511, 3) = "EXE" Then
  136.         GoSub 4836
  137.         If o6644 = 0 Then
  138.           Beep 
  139.           Print s4471
  140.           Print "Sorry - no ZIP archive found in this EXE file."; s4467
  141.           End 
  142.         End If
  143.       End If
  144.   878 GoSub 4803
  145.       Open s4523 For Input As 1
  146.       Open s4527 For Output As 2
  147.       Print #2, s4475; "Archive View "; s4467; s4507; s4471; " "; Chr(254); s4463; " File "; s4479; s4515
  148.       Print #2, s4467
  149.       Print #2, "File  File Size         File  Creation   Path /  "
  150.       Print #2, "No.   Original.....Now  Date......Time   Filename"
  151.       Print #2, ""
  152.       i4497 = 5
  153.       If LOF(1) = 0 Then
  154.         Beep 
  155.         Print
  156.         Print s4479; s4515; s4471; " is corrupt and has been moved offline"
  157.         Print
  158.         Print s4475; MakeWild.SysopName; " has been notified.."
  159.         Print
  160.         ActivityLog ">>> WARNING FROM AVU: " + s4511 + " is corrupt!"
  161.         Reset 
  162.         GoSub 2936
  163.         Sub7097
  164.         End 
  165.       End If
  166.  1155 Do While Not EOF(1)
  167.         Input #1, s4535
  168.         If Right(s4535, 1) <> "/" Then
  169.           GoSub 1997
  170.         End If
  171.  1203 Loop
  172.  1209 Reset 
  173.       Sub7068(s4527)
  174.       Print
  175.       Do
  176.  1223   Print
  177.         Print s4467;
  178.         If i4493 > 0 Then
  179.           o6640 = 0
  180.           Do
  181.  1253       Print s4467 + "Enter number of file to view: " + s4479 + "1 - " + Str(i4493) + s4467 + " '" + s4471 + "Q" + s4467 + "' to quit";
  182.             If o6642 Then
  183.               Print " or '" + s4471 + "D" + s4467 + "' to download: ";
  184.             End If
  185.  1376       s4592 = InputMask("", "XXX", "", 1213417543)
  186.             i4491 = Val(s4592)
  187.             If i4491 = 0 Then
  188.               s4595 = "L"
  189.               i4491 = Asc(s4592)
  190.               GoSub 3152
  191.             Else
  192.  1470         s4595 = "N"
  193.               i4491 = i4491
  194.               If i4491 >= 0 And i4491 <= i4493 Then
  195.                 GoTo 1534
  196.               End If
  197.             End If
  198.  1525       Beep 
  199.           Loop
  200.  1534   Else
  201.  1540     Beep 
  202.           Print s4467 + "There are no viewable files in this archive! Press '" + s4475 + "0" + s4467 + "' to quit ";
  203.           i4491 = InputNumber("", 0, 0)
  204.           Sub7097
  205.           End 
  206.         End If
  207.  1606   If s4595 = "N" Then
  208.           Print "Fetching "; s4479; s4635(i4491); s4475; ".. please wait a moment"
  209.           Shell "unzip -cqqaa " + s4511 + " " + s4635(i4491) + " > " + s4531, ""
  210.           Cls 
  211.           If o6639 Then
  212.             GoSub 3060
  213.           End If
  214.  1774     Print s4475; "Displaying "; s4467; s4635(i4491); s4471; " from "; s4479; s4515; s4471; "  ";
  215.           If o6640 Then
  216.             Print s4483; "(Up to "; l4503; " bytes)"; s4471
  217.             Print
  218.           Else
  219.  1918       Print
  220.           End If
  221.  1920     Print
  222.           w4487 = DisplayTextFile(s4531)
  223.           If Not o6640 Then
  224.             Print
  225.             Print s4463; Chr(254); " End of file "; Chr(254)
  226.           End If
  227.  1978     WaitEnter 
  228.           Sub7068(s4527)
  229.         End If
  230.  1990 Loop
  231.       End 
  232.  1997 i4495 = i4495 + 1
  233.       s4559 = Mid(s4535, 1, 7)
  234.       s4567 = Mid(s4535, 17, 7)
  235.       s4575 = Mid(s4535, 31, 8)
  236.       s4579 = Mid(s4535, 41, 5)
  237.       s4547 = Mid(s4535, 59, Len(s4535) - 58)
  238.       s4551 = UCase(Right(s4547, 4))
  239.       If Right(s4551, 1) <> "/" Then
  240.         s65532_ = s4551
  241.         If s65532_ = ".EXE" Then GoTo 2617
  242.         If s65532_ = ".COM" Then GoTo 2617
  243.         If s65532_ = ".BIN" Then GoTo 2617
  244.         If s65532_ = ".SYS" Then GoTo 2617
  245.         If s65532_ = ".ZIP" Then GoTo 2617
  246.         If s65532_ = ".PAK" Then GoTo 2617
  247.         If s65532_ = ".LHA" Then GoTo 2617
  248.         If s65532_ = ".ARJ" Then GoTo 2617
  249.         If s65532_ = ".RAR" Then GoTo 2617
  250.         If s65532_ = ".ARC" Then GoTo 2617
  251.         If s65532_ = ".DLL" Then GoTo 2617
  252.         If s65532_ = ".BMP" Then GoTo 2617
  253.         If s65532_ = ".ICO" Then GoTo 2617
  254.         If s65532_ = ".JPG" Then GoTo 2617
  255.         If s65532_ = ".HLP" Then GoTo 2617
  256.         If s65532_ = ".INI" Then GoTo 2617
  257.         If s65532_ = ".UC2" Then GoTo 2617
  258.         If s65532_ = ".HAP" Then GoTo 2617
  259.         If s65532_ = ".OVL" Then GoTo 2617
  260.         If s65532_ = ".OVR" Then GoTo 2617
  261.         If s65532_ = ".SVP" Then GoTo 2617
  262.         If s65532_ = ".VBX" Then GoTo 2617
  263.         If s65532_ = ".OCX" Then GoTo 2617
  264.         If s65532_ = ".FRX" Then GoTo 2617
  265.         If s65532_ = ".WCX" Then GoTo 2617
  266.         If s65532_ = ".PCX" Then GoTo 2617
  267.         If s65532_ = ".GIF" Then GoTo 2617
  268.         If s65532_ = ".WAV" Then
  269.  2617     s4555 = s4483
  270.           Print #2, s4471; "["; s4483; " - "; s4471; "]  "; s4483;
  271.         Else
  272.  2679     s4555 = s4471
  273.           i4493 = i4493 + 1
  274.           s4596 = Right("   " + Str(i4493), 3)
  275.           Print #2, s4471; "["; s4475; s4596; s4471; "]  "; s4479;
  276.           s4635(i4493) = s4547
  277.         End If
  278.       End If
  279.  2809 Print #2, s4559; " ";
  280.       Print #2, s4567; "  "; s4475;
  281.       Print #2, s4575; "  ";
  282.       Print #2, s4579; "  "; s4555;
  283.       Print #2, s4547
  284.       If i4495 > i4497 Then
  285.         Print ".";
  286.         i4497 = i4497 + 5
  287.       End If
  288.  2935 Return 
  289.  2936 If GetFileInfo(fr6645, s4515) Then
  290.         fr6645.Flags = 32
  291.         fr6645.Keywords(6) = "CORRUPT!"
  292.         UpdateFile(fr6645)
  293.         ActivityLog ">>> MESSAGE FROM AVU: moved " + s4511 + " offline!"
  294.       Else
  295.  3038   ActivityLog ">>> WARNING FROM AVU: unable to move " + s4511 + " offline!"
  296.       End If
  297.  3059 Return 
  298.  3060 Open s4531 For Binary As 1
  299.       If LOF(1) > l4503 Then
  300.         Put 1, l4503 - Len(s4600), s4600 '! 35 bytes
  301.         Put 1, l4503, s4599 '! 1 bytes
  302.         o6640 = -1
  303.       End If
  304.  3146 Close 1
  305.       Return 
  306.  3152 If s4595 = "L" Then
  307.         i65530_ = i4491
  308.         If i65530_ = 48 Then GoTo 3226
  309.         If i65530_ = 81 Then GoTo 3226
  310.         If i65530_ = 113 Then
  311.  3226     Sub7097
  312.           End 
  313.         Else
  314.  3239     If i65530_ = 68 Then GoTo 3269
  315.           If i65530_ = 100 Then
  316.  3269       If o6641 Then
  317.               If o6642 Then
  318.                 i4501 = InputNumber("Download which file #:" + s4479 + "0, 1 - " + Str(i4493) + s4467 + " ", 0, i4493)
  319.                 If i4501 = 0 Then
  320.                   Sub7068(s4527)
  321.                   Return 
  322.                 End If
  323.  3370           If InStr(s4635(i4501), "/") Then
  324.                   Beep 
  325.                   Print s4475; "Sorry! Can't (yet) extract files with pathnames.."
  326.                   Print "Turn screen capture on and use view ("; s4471; i4501; s4475; ")instead"; s4471
  327.                   WaitEnter 
  328.                 Else
  329.  3481             Shell "unzip -qoj " + s4511 + " " + s4635(i4501) + " -d " + s4519, ""
  330.                   Open s4519 + s4635(i4501) For Binary As 1
  331.                   fr6645.Size = LOF(1)
  332.                   Close 1
  333.                   fr6645.Name = s4635(i4501)
  334.                   fr6645.StoredPath = s4519
  335.                   fr6645.Area = i4499
  336.                   fr6645.Description = s4479 + "File for " + s4475 + User.Name + s4479 + " extracted from " + s4463 + s4515
  337.                   If o6643 Then
  338.                     fr6645.Password = User.Password
  339.                   End If
  340.  3782             fr6645.Uploader = "AVU"
  341.                   fr6645.Keywords(1) = "AVU"
  342.                   If AddFile(fr6645) Then
  343.                     ActivityLog "Extracted " + s4635(i4501) + " for download (new)"
  344.                     If GetFileInfo(fr6645, s4635(i4501)) Then
  345.                       UpdateFile(fr6645)
  346.                       Beep 
  347.                       Print
  348.                       GoSub 4517
  349.                     End If
  350.  3955             Else
  351.  3961               ActivityLog "Extracted " + s4635(i4501) + " for download (update)"
  352.                     Beep 
  353.                     GoSub 4517
  354.                   End If
  355.                 End If
  356.  4016           Return 
  357.               End If
  358.  4017       Else
  359.  4023         Beep 
  360.               Print "Sorry: "; MakeWild.SysopName; " has not "; "configured a download area.."
  361.               WaitEnter 
  362.             End If
  363.  4064     Else
  364.  4070       If i65530_ = 33 Then
  365.               Cls 
  366.               Print s4471;
  367.               Print "AVU - A freeware archive view utility for Wildcat"
  368.               s8129 = "DJL361"
  369.               If s8129 = "DJL361" Then
  370.                 Print "This module was compiled at Mildew Hall Online Services/2"
  371.               End If
  372.  4140         Print s4471
  373.               Print "Archive View Utility (c) Peter Garner 1996"
  374.               Print
  375.               Print "This is freeware!"
  376.               Print
  377.               Print "Call Mildew Hall Online Services/2 on:"
  378.               Print "+44-0(1420)-543542   24 hrs, or, "
  379.               Print "email: sysop@mildewh.dircon.co.uk"
  380.               Print
  381.               Print s4467
  382.               WaitEnter 
  383.               Sub7068(s4527)
  384.               Return 
  385.             Else
  386.  4226         If i65530_ = 63 Then GoTo 4271
  387.               If i65530_ = 72 Then GoTo 4271
  388.               If i65530_ = 104 Then
  389.  4271           Print
  390.                 Print s4475; "("; s4467; "h"; s4475; ")"; s4479; "elp ";
  391.                 Print s4475; "("; s4467; "q"; s4475; ")"; s4463; "uit ";
  392.                 If o6641 Then
  393.                   If o6642 Then
  394.                     Print s4475; "("; s4467; "d"; s4475; ")"; s4471; "ownload "; "extracted file from file area "; s4479; i4499
  395.                   End If
  396.                 End If
  397.  4477           Print
  398.               Else
  399.  4485           If s4589 = "0" Then
  400.                   Print i4491
  401.                 End If
  402.  4513           Beep 
  403.               End If
  404.             End If
  405.           End If
  406.         End If
  407.       End If
  408.  4516 Return 
  409.  4517 Print s4479; fr6645.Name; s4471; " is ready to download from area "; s4475; i4499; s4471;
  410.       If o6643 Then
  411.         Print " (Password is "; s4479; User.Password; s4471; ")";
  412.       End If
  413.  4620 Print s4467
  414.       Print
  415.       WaitEnter 
  416.       Return 
  417.  4634
  418.  4662 For i4489 = Len(s4511) To 1 Step - 1
  419.         If Mid(s4511, i4489, 1) = "\" Then
  420.           s4515 = Mid(s4511, i4489 + 1, Len(s4511) - i4489)
  421.           GoTo 4802
  422.         End If
  423.  4779 Next
  424.  4802 Return 
  425.  4803 Shell "unzip -vqq " + s4511 + " > " + s4523, ""
  426.       Return 
  427.  4836 o6644 = 0
  428.       Shell "unzip -Zh " + s4511 + " > " + s4523, ""
  429.       Open s4523 For Binary As 1
  430.       If LOF(1) = 0 Then
  431.         o6644 = 0
  432.         Close 1
  433.         Kill s4523
  434.       Else
  435.  4931   Close 1
  436.         Kill s4523
  437.         o6644 = -1
  438.       End If
  439.  4951 Return 
  440.  
  441. '! Called 4 times
  442.       Sub Sub7068(s65534 As String)
  443.         Cls 
  444.         w4487 = DisplayTextFile(s65534)
  445.       End Sub
  446.  
  447. '! Called 3 times
  448.       Sub Sub7097
  449.         If Exists(s4523) Then
  450.           Kill s4523
  451.         End If
  452.  7126   If Exists(s4527) Then
  453.           Kill s4527
  454.         End If
  455.  7146   If Exists(s4531) Then
  456.           Kill s4531
  457.         End If
  458.  7166
  459.       End Sub
  460.